package object;

public class Test_1 {

}
class Solution {
    public static boolean isValid(char c){
        if((c >= 'a' && c <= 'z') || (c >= '0' && c <= '9')){
            return true;
        }
        return false;
    }



    public boolean isPalindrome(String s) {
        s = s.toLowerCase();
        int left = 0;
        int right = s.length() - 1;
        while(left < right){

            while(left < right && !isValid(s.charAt(left)) ){
                left++;
            }
            while(left < right && !isValid(s.charAt(right)) ){
                right--;
            }
            if(left < right && s.charAt(left) == s.charAt(right)){
                left++;
                right--;
                continue;
            } else {
                return false;
            }

        }
        return true;










    }
}
